< previous page page_694 next page >

Page 694
0694-01.jpg
Figure 18.5.
Laying out the RDC data-entry form.
Now save the project as PRJRDC.VBP, the main form as FRMDATAENTRY.FRM, and the support form as FRMMSGS.FRM. Now you're ready to add Visual Basic code to the forms.
Coding the RDC Data-Entry Forms
First, you need to add code to two events in the frmMsgs form. Listing 18.1 shows the code for the Form_Load and Form_Resize events. Add this code to your support form.
Type.gifListing 18.1. Coding the events for the frmMsgs support form.
Private Sub Form_Load()
    '
    Me.Caption = "MSRDC Event Messages"
    txtMsg.Text = ""
    '
End Sub

Private Sub Form_Resize()
    '
    ' make text box fill the form
    '
    If Me.WindowState <> vbMinimized Then
        txtMsg.Left = 1
        txtMsg.Top = 1
        txtMsg.Width = Me.ScaleWidth
        txtMsg.Height = Me.ScaleHeight
    End If
    '
End Sub

 
< previous page page_694 next page >

If you like this book, buy it!